"""
__project__ = 'thc'
__file_name__ = '第六节课作业'
__author__ = 'thc'
__time__ = '2020/11/7 18:58'
__product_name = PyCharm
-*- coding:utf-8 -*-
"""
import random
"""
# 猜拳游戏
my_list = ['剪刀', '石头', '布']
wanJia = 0
dianNao = 0
while True:
    user = input('请输入剪刀，石头，布：')
    i = random.randint(0, 2)
    if user not in my_list:
        print('输入错误请重新输入')
    else:
        print('玩家出：%s' % user)
        print('电脑出：%s' % my_list[i])
        if user == my_list[i]:
            print('平局')
        elif (user == '石头' and my_list[i] == '剪刀') \
                or (user == '剪刀' and my_list[i] == '布') \
                or (user == '布' and my_list[i] == '石头'):
            print('玩家胜利')
            wanJia += 1
        else:
            print('电脑胜利')
            dianNao += 1
    if wanJia == 3:
        print('玩家胜利%d场' % wanJia)
        print('电脑胜利%d场' % dianNao)
        print('玩家获胜')
        print('游戏结束')
        break
    elif dianNao == 3:
        print('玩家胜利%d场' % wanJia)
        print('电脑胜利%d场' % dianNao)
        print('电脑获胜')
        print('游戏结束')
        break
"""

"""
# 三个教室八个老师
jiaoShi = [[], [], []]             # 为什么不能是list（[][][]）
laoShi = list('12345678')
for i in laoShi:
    a = random.randint(0, 2)
    jiaoShi[a].append(i)
print(jiaoShi)
"""

"""
# 循环输出整数0到10
for i in range(11):
    print(i)
"""
"""
# 逆序'
str1 = ['欢', '乐', '逛', '欢', '迎', '您']           怎么能显示的时候是个整体没有逗号跟引号
# str1.reverse()
str2 = str1[::-1]
print(str2)
"""
"""
# 查找
str = 'a,hello'
cz = str.find('hello')
print(cz)
"""
"""
# 分割
str = 'a,b,c,d'
fg = str.split(',')
print(fg)
"""
"""
# 替换
str = '笔试题123A'
th = str.replace('123', '进行中')
print(th)
"""




